﻿@model IEnumerable<PaginaWeb.Models.MiProducto>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_ClienteLayout.cshtml";
}
<table class="table table-hover">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.nombre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.modelo)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.marca)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.precio)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.descripcion)
        </th>
        <th>
            Foto
        </th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            <a href="~/MiProducto/Details/@item.id" target="_blank">
            @Html.DisplayFor(modelItem => item.nombre)
            </a>    
            
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.modelo)
        </td>
        <td>
            <a href="~/Marca/Details/@item.marca.id">
                @Html.DisplayFor(modelItem => item.marca.nombre)
            </a>
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.precio)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.descripcion)
        </td>
        <td>
            <img src="@Html.DisplayFor(modelItem => item.url)" class="img-rounded" style="max-width: 30%"/>
        </td>
    </tr>
}
 </table>